package com.bjsxt.shopping.dao;

import java.sql.Timestamp;
import java.util.List;

import com.bjsxt.shopping.util.Product;

public interface ProductDAO {
	public List<Product> getProducts();
	
	public List<Product> getProducts(int pageNo,int pageSize);
	
	public int findProducts(List<Product> products,int[] categoryId,
			 String keyword,
			 double lowNormalPrice,
			 double highNormalPrice,
			 double lowMemberPrice,
			 double highMemberPrice,
			 Timestamp startDate,
			 Timestamp endDate,
			 int pageNo,
			 int pageSize);
	
	public boolean deleteProductBycategoryId(int categoryId);
	
	public boolean deleteProductBycategoryId(int[] categoryId);
	
	public boolean updateProduct(Product p);
	
	public boolean addProduct(Product p);

	public int getProducts(List<Product> products, int pageNo, int pageSize);

	public Product loadById(int id);

	public boolean updateProduct(Product p, int id);

	public List<Product> getLatestProducts(int count);
}
